Skip to main content
POST
/
v1
/
organizations
/
{organization_id}
/
projects
/
{project_id}
/
compute
/
instances
/
{instance_id}
/
firewall
/
apply
[Firewall] Apply firewall rules to an instance
curl --request POST \
  --url https://api.onetsolutions.net/v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/firewall/apply \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "direction": "inbound",
  "action": "accept",
  "protocol": "tcp",
  "destination_port": "<string>",
  "source_cidr": "<string>",
  "destination_cidr": "<string>",
  "priority": 2147483647,
  "is_enabled": true
}
'

Documentation Index

Fetch the complete documentation index at: https://help.onetsolutions.net/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use Authorization: Bearer <token> header. Token can be a JWT token or an API key (format: sk-onetsolutions-...).

Path Parameters

instance_id
string
required

Unique identifier of the compute instance.

organization_id
string
required

Unique identifier of the organization that owns the resource.

project_id
string
required

Unique identifier of the project containing the resource.

Body

application/json
name
string
required

Rule name

Maximum string length: 255
description
string

Rule description

direction
enum<string>
  • inbound - Inbound
  • outbound - Outbound
Available options:
inbound,
outbound
action
enum<string>
  • accept - Accept
  • drop - Drop
  • reject - Reject
Available options:
accept,
drop,
reject
protocol
enum<string>
  • tcp - TCP
  • udp - UDP
  • icmp - ICMP
  • all - All
Available options:
tcp,
udp,
icmp,
all
destination_port
string
source_cidr
string

Source IP en notation CIDR (ex: 0.0.0.0/0 pour tout)

Maximum string length: 100
destination_cidr
string

Destination IP en notation CIDR

Maximum string length: 100
priority
integer<int64>

Priorité (plus petit = plus prioritaire)

Required range: 0 <= x <= 4294967295
is_enabled
boolean

Response

Firewall rules application initiated